package com.evl.common.persistence.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.evl.common.persistence.model.TicketRemainder;
import com.evl.common.persistence.model.VehicleSchedule;

/**
 * <p>
  * 余票表 Mapper 接口
 * </p>
 *
 * @author yangliwei
 * @since 2017-06-14
 */
public interface TicketRemainderMapper extends BaseMapper<TicketRemainder> {

	List<TicketRemainder> selectTicketRemaindersPage(@Param("page")Page<TicketRemainder> page, @Param("departure")String departure, @Param("arrive")String arrive, @Param("startTime")String startTime, @Param("endTime")String endTime);

	List<TicketRemainder> selectTicketRemainders(@Param("departure")String departure, @Param("arrive")String arrive, @Param("startTime")String startTime, @Param("endTime")String endTime);

	TicketRemainder selectTicketOne(@Param("staId")Integer staId, @Param("departure")String departure,@Param("arrive")String arrive);

	List<TicketRemainder> selectTicketRemaindersByStaId(@Param("staId")Integer staId);
	
	List<TicketRemainder> selectTicketRemaindersByStaIds(@Param("staId")Integer staId);

	void batchUpdateRemainders(List<TicketRemainder> ticketRemainders);

	List<TicketRemainder> selectTicketRemaindersByStaIds(List<VehicleSchedule> vehicleSchedules);

	void deleteByStaId(@Param("staId")Integer vehicleScheduleId);

}